﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERP.Domain.Workorders.Inventory
{
    /// <summary>
    /// 库存调拨表
    /// </summary>
    [Table("inventoryTransfer")]
    public class InventoryTransfer
    {
        /// <summary>
        /// 自增主键
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        /// <summary>
        /// 货品编号
        /// </summary>
        [MaxLength(30)]
        public string ProductCode { get; set; }

        /// <summary>
        /// 货品名称
        /// </summary>
        [MaxLength(30)]
        public string ProductName { get; set; }

        /// <summary>
        /// 调拨申请日期
        /// </summary>
        public DateTime? TransferApplyDate { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        [MaxLength(30)]
        public string Specification { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        [MaxLength(30)]
        public string Unit { get; set; }

        /// <summary>
        /// 货品类型
        /// </summary>
        [MaxLength(30)]
        public string ProductType { get; set; }

        /// <summary>
        /// 调出仓库
        /// </summary>
        [MaxLength(30)]
        public string SourceWarehouse { get; set; }

        /// <summary>
        /// 调入仓库
        /// </summary>
        [MaxLength(30)]
        public string TargetWarehouse { get; set; }

        /// <summary>
        /// 调入数量
        /// </summary>
        public int? InboundQuantity { get; set; }

        /// <summary>
        /// 调入金额
        /// </summary>
        [Column(TypeName = "decimal(10,2)")]
        public decimal? InboundAmount { get; set; }

        /// <summary>
        /// 调出数量
        /// </summary>
        public int? OutboundQuantity { get; set; }

        /// <summary>
        /// 调出金额
        /// </summary>
        [Column(TypeName = "decimal(10,2)")]
        public decimal? OutboundAmount { get; set; }
    }
}
